package com.taobao.askwho.ao;

import com.taobao.askwho.db.impl.UserInfoDao;
import com.taobao.askwho.po.UserInfo;

public class UserAo {
	public UserAo() {
	}
	private static UserAo userAo = new UserAo();
	UserInfoDao userInfoDao = new UserInfoDao();
	public static UserAo get() {
		return userAo;
	}
	
	public UserInfo findUserByUuid(String uuid) {
		return userInfoDao.getUrlInfoById(uuid);
	}
	
	public UserInfo findUserByEmail(String email) {
		return userInfoDao.getUserInfoByEmail(email);
	}
	
	public void addNewUser(UserInfo user) throws Exception{
		userInfoDao.addNewUser(user);
	}
	
	public void updateUser(UserInfo user) throws Exception{
		userInfoDao.updateUser(user);
	}
}
